<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no"/>
    <link rel="stylesheet" href="__CSS__/common.css" />
    <link rel="stylesheet" href="__CSS__/invite.css" />
    <title>邀请好友</title>
</head>
<body>
    <div class="team-msg">
        <p class="title">我的个人信息</p>
        <div>
            <a href="#">
                <img src="{$user.head_pic}" alt="{$user.nickname}">
            </a>
            <div>
                <p>{$user.nickname} <span><img src="__IMG__/index/Vip2.png">VIP</span></p>
                <p>推荐码：{$user.recode}</p>
                <p>手机号：{$user.mobile}</p>
            </div>
        </div>
    </div>
    <div class="mask"></div>
    <div class="share-box">
        <div>
            <div class="wexin">
                <img class="share" src="__IMG__/nav/weixin.png" alt="">
                <p>微信好友</p>
            </div>
            <div class="pengyou">
                <img class="share"  src="__IMG__/nav/pengyouquan.png" alt="">
                <p>朋友圈</p>
            </div>
            <div class="erweima">
                <img class="share"  src="__IMG__/nav/erweima.png" alt="">
                <p>二维码</p>
            </div>
        </div>
        <a>取消</a>
    </div>
<button class="btn">分享</button>
</body>
<script src="__JS__/jquery.min.js"></script>
<script src="__JS__/layer.js"></script>
<script type="text/javascript">
    $(()=>{
        $.ajax({
            type:'',
            url:'',
            data:{},
            success:function (data){
                var html='';
                for(var p of data){
                    html+=`
                <p class="title">我的上线</p>
                <div>
                    <a href="user.html">
                        <img src="img/index/icon.png" alt="">
                    </a>
                    <div>
                        <p>夏天 <span><img src="img/index/Vip2.png">VIP</span></p>
                        <p>推荐码：KJLAHS2ASD</p>
                        <p>手机号：13156485464</p>
                    </div>
                </div>
            `
                }
                $('.team-msg').html(html);

            }
        })

        $(".btn").click(()=>{
            $(".mask").css("height",$(document).height());
            $(".mask").css("width",$(document).width());
            $('.mask').show();
            $('.share-box').show();
        })
        $('.share-box>a').click(()=>{
            $('.share-box').hide();
            $('.mask').hide();
        })
        $('.share').click((e)=>{
            var weixin=$('.wexin>img').attr('src');
            var pengyou=$('.pengyou>img').attr('src');
            var erweima=$('.erweima>img').attr('src');
            var tar=$(e.target).attr('src');
            if(tar==weixin){console.log('微信')}
            else if(tar==pengyou)console.log('朋友圈')
            else if(tar==erweima)console.log('二维码')
        })
    })
</script>
</html>